<?php // no direct access
defined('_JEXEC') or die('Restricted access'); ?>

<script type="text/javascript">
$(document).ready(function() {
	$.unblockUI;
    $('#button_submit').click(function(){
		var val = $("#objek_name").val();
		if(val != '' || val.length != 0)
		{
			$.blockUI({ 
				message: $('img#displayBox'),
				css: { 
		            border: 'none', 
		            padding: '15px', 
		            backgroundColor: '#000', 
		            '-webkit-border-radius': '10px', 
		            '-moz-border-radius': '10px', 
		            opacity: .5, 
		            color: '#fff' 
				}
			});
	 
	        //setTimeout($.unblockUI, 5000);
		}
    }); 
});
</script>
<img id="displayBox" src="components/com_nv/assets/images/nadi.gif" style="display:none" />
<fieldset class="adminform">
	<legend>Search</legend>
	<form action="index.php?option=com_nv" method="post" name="adminForm" id="adminForm">
		<table class="admintable">
			<tr>
				<td class="key">Objek Wisata :</td>
				<td>
					<input name="objek_name" type="text" class="textfieldku" id="objek_name" />
					<script type="text/javascript">
						var objek_name = new LiveValidation('objek_name', { validMessage: "Thanks for the input!" });
						objek_name.add(Validate.Presence, { failureMessage: "Field can't be empty!" });
					</script>
				</td>
			</tr>
			<tr>
				<td>&nbsp;</td>	
				<td>
					<input name="submit" type="submit" value="Cari" class="buttonku" id="button_submit" />
					<input name="reset" type="reset" value="Clear!" class="buttonku" id="button_reset" /> 
					<input name="result" type="hidden" value="true" />
				</td>
			</tr>
		</table>
		
		<input type="hidden" name="option" value="com_nv" />
		<input type="hidden" name="task" value="search" />
		<input type="hidden" name="view" value="blog" />
		<input type="hidden" name="boxchecked" value="0" />
		<input type="hidden" name="controller" value="nv" />
		<?php echo JHTML::_( 'form.token' ); ?>
	</form>
	
<?
		if($this->result)
		{
?>
			<table class="admintable" border="0">
				<tr>
					<!-- KOLOM UNTUK HASIL MASHUP WIKIPEDIA -->
					<td valign="top" colspan="2">
<?
						/****************** MASHUP WIKI ZONE *******************/
						echo '<div class="result"><fieldset><legend>source: http://id.wikipedia.org/</legend>'.$this->wiki.'</fieldset></div>';
						/*************** END OF MASHUP WIKI ZONE **************/
?>
					</td>
					<!-- AKHIR DARI KOLOM UNTUK HASIL MASHUP BLOGS -->
				</tr>
				
				<tr>
					<!-- KOLOM UNTUK HASIL MASHUP WIKIPEDIA -->
					<td valign="top" colspan="2">
<?
						/****************** MASHUP INDOTRAVEL ZONE *******************/
						echo '<div class="result"><fieldset><legend>source: http://www.indonesia.travel/</legend>'.$this->indotravel.'</fieldset></div>';
						/*************** END OF MASHUP INDOTRAVEL ZONE **************/
?>
					</td>
					<!-- AKHIR DARI KOLOM UNTUK HASIL MASHUP BLOGS -->
				</tr>
				
				<tr>
					<!-- KOLOM UNTUK HASIL MASHUP BLOGS -->
					<td valign="top">
<?
						/****************** MASHUP BLOG ZONE *******************/
						echo '<div class="result"><fieldset><legend>source: http://www.wordpress.com/</legend><div class="scroll">'.$this->blogs.'</div></fieldset></div>';
						/*************** END OF MASHUP BLOG ZONE **************/
?>
					</td>
					<!-- AKHIR DARI KOLOM UNTUK HASIL MASHUP BLOGS -->
					
					<!-- KOLOM UNTUK HASIL MASHUP NEWS -->
					<td valign="top" width="50%">
<?
						/****************** MASHUP NEWS ZONE *******************/
						echo '<div class="result"><fieldset><legend>source: http://travel.kompas.com/</legend><div class="scroll">'.$this->news.'</div></fieldset></div>';
						/*************** END OF MASHUP NEWS ZONE **************/
?>
					</td>
					<!-- AKHIR DARI KOLOM UNTUK HASIL MASHUP NEWS -->
				</tr>
			</table>
<?
		}//end of if RESULT
?>		
</fieldset>